/*
 * TestGetType.cpp
 *
 *  Created on: May 3, 2012
 *  	Author: Anuradha Uduwage <uduwage@cs.umn.edu>
 *      Author: Shuo Chang <schang@cs.umn.edu>
 */

#include <limits.h>
#include "CommandHelper.h"
#include "gtest/gtest.h"

TEST(CommandHelper, UNKOWN) {
    tr1::shared_ptr<Course> crs(new Course("Fall",
            "2010", "CSCI", "546", 3, 3, "A", 12.0,
            Course::AF));
    EXPECT_EQ(CommandHelper::getType(*crs), CommandHelper::UNKNOWN);
}

TEST(CommandHelper, OUTOFDEPARTMENT) {
    tr1::shared_ptr<Course> crs(new Course("Fall",
            "2010", "CI", "546", 3, 3, "A", 12.0,
            Course::AF));
    EXPECT_EQ(CommandHelper::getType(*crs), CommandHelper::OUTOFDEPARTMENT);
}

TEST(CommandHelper, TheoryFoundation) {
    tr1::shared_ptr<Course> crs(new Course("Fall",
            "2010", "CSCI", "5421", 3, 3, "A", 12.0,
            Course::AF));
    EXPECT_EQ(CommandHelper::getType(*crs), CommandHelper::THEORY_FOUNDATIONS);
}
